<template>
  <div>
    <h3>实际应用</h3>
    <p v-for="item in arr" :key="item.id">
      {{item.id}} -- {{item.name}} -- {{item.age}}
    </p>
    <button @click="fn">新来的</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: [
        {id: 1, name: '小花', age: 18},
        {id: 2, name: '小草', age: 17},
        {id: 101, name: '小绿叶', age: 16}
      ]
    }
  },
  methods: {
    fn() {
      this.arr.push({
        id: + new Date(),
        name: '小茶叶',
        age: 4
      })
    }
  }
}
</script>

<style>

</style>